package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.BankEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户银行卡 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-08-14 19:02:44
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class BankQuery extends BankEntity implements Query<BankEntity>{


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 银行卡号查询条件 */
	@JsonUnwrapped(prefix = "encBankNo")
	private Condition<String> encBankNoCondition;

    /** 银行开户用户名查询条件 */
	@JsonUnwrapped(prefix = "encTrueName")
	private Condition<String> encTrueNameCondition;

    /** 开户行code查询条件 */
	@JsonUnwrapped(prefix = "bankCode")
	private Condition<String> bankCodeCondition;

    /** 银行名称查询条件 */
	@JsonUnwrapped(prefix = "bankName")
	private Condition<String> bankNameCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "userId")
	private Condition<String> userIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public BankQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public BankQuery(BankEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public BankQuery(BankQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.encBankNoCondition != null) {
			this.encBankNoCondition = other.encBankNoCondition.copy();
		}
		if(other.encTrueNameCondition != null) {
			this.encTrueNameCondition = other.encTrueNameCondition.copy();
		}
		if(other.bankCodeCondition != null) {
			this.bankCodeCondition = other.bankCodeCondition.copy();
		}
		if(other.bankNameCondition != null) {
			this.bankNameCondition = other.bankNameCondition.copy();
		}
		if(other.userIdCondition != null) {
			this.userIdCondition = other.userIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<BankEntity> toQueryWrapper() {
		QueryWrapper<BankEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (encBankNoCondition != null) {
			encBankNoCondition.toWrapper(wrapper, COL_ENC_BANK_NO);
		}
		if (encTrueNameCondition != null) {
			encTrueNameCondition.toWrapper(wrapper, COL_ENC_TRUE_NAME);
		}
		if (bankCodeCondition != null) {
			bankCodeCondition.toWrapper(wrapper, COL_BANK_CODE);
		}
		if (bankNameCondition != null) {
			bankNameCondition.toWrapper(wrapper, COL_BANK_NAME);
		}
		if (userIdCondition != null) {
			userIdCondition.toWrapper(wrapper, COL_USER_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回银行卡号查询条件
	 * 
	 * @return encBankNoCondition 银行卡号查询条件
	 */
	public Condition<String> encBankNo() {
		this.encBankNoCondition = new Condition<>();
		return this.encBankNoCondition;
	}
	
	/**
	 * 获取银行卡号查询条件
	 * 
	 * @return encBankNoCondition 银行卡号查询条件
	 */
	public Condition<String> getEncBankNoCondition() {
		return encBankNoCondition;
	}

	/**
	 * 设置银行卡号查询条件
	 * 
	 * @param encBankNoCondition 银行卡号查询条件
	 */
	public void setEncBankNoCondition(Condition<String> encBankNoCondition) {
		this.encBankNoCondition = encBankNoCondition;
	}

	/**
	 * 构造并返回银行开户用户名查询条件
	 * 
	 * @return encTrueNameCondition 银行开户用户名查询条件
	 */
	public Condition<String> encTrueName() {
		this.encTrueNameCondition = new Condition<>();
		return this.encTrueNameCondition;
	}
	
	/**
	 * 获取银行开户用户名查询条件
	 * 
	 * @return encTrueNameCondition 银行开户用户名查询条件
	 */
	public Condition<String> getEncTrueNameCondition() {
		return encTrueNameCondition;
	}

	/**
	 * 设置银行开户用户名查询条件
	 * 
	 * @param encTrueNameCondition 银行开户用户名查询条件
	 */
	public void setEncTrueNameCondition(Condition<String> encTrueNameCondition) {
		this.encTrueNameCondition = encTrueNameCondition;
	}

	/**
	 * 构造并返回开户行code查询条件
	 * 
	 * @return bankCodeCondition 开户行code查询条件
	 */
	public Condition<String> bankCode() {
		this.bankCodeCondition = new Condition<>();
		return this.bankCodeCondition;
	}
	
	/**
	 * 获取开户行code查询条件
	 * 
	 * @return bankCodeCondition 开户行code查询条件
	 */
	public Condition<String> getBankCodeCondition() {
		return bankCodeCondition;
	}

	/**
	 * 设置开户行code查询条件
	 * 
	 * @param bankCodeCondition 开户行code查询条件
	 */
	public void setBankCodeCondition(Condition<String> bankCodeCondition) {
		this.bankCodeCondition = bankCodeCondition;
	}

	/**
	 * 构造并返回银行名称查询条件
	 * 
	 * @return bankNameCondition 银行名称查询条件
	 */
	public Condition<String> bankName() {
		this.bankNameCondition = new Condition<>();
		return this.bankNameCondition;
	}
	
	/**
	 * 获取银行名称查询条件
	 * 
	 * @return bankNameCondition 银行名称查询条件
	 */
	public Condition<String> getBankNameCondition() {
		return bankNameCondition;
	}

	/**
	 * 设置银行名称查询条件
	 * 
	 * @param bankNameCondition 银行名称查询条件
	 */
	public void setBankNameCondition(Condition<String> bankNameCondition) {
		this.bankNameCondition = bankNameCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return userIdCondition 查询条件
	 */
	public Condition<String> userId() {
		this.userIdCondition = new Condition<>();
		return this.userIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return userIdCondition 查询条件
	 */
	public Condition<String> getUserIdCondition() {
		return userIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param userIdCondition 查询条件
	 */
	public void setUserIdCondition(Condition<String> userIdCondition) {
		this.userIdCondition = userIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param merchantIdCondition 查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
